package net.xiduth.game.npc.combat.impl;

import net.xiduth.game.Animation;
import net.xiduth.game.Entity;
import net.xiduth.game.Hit;
import net.xiduth.game.npc.NPC;
import net.xiduth.game.npc.combat.CombatScript;
import net.xiduth.game.npc.combat.NPCCombatDefinitions;
import net.xiduth.utils.Misc;

public class DagRex extends CombatScript {

	public Object[] getKeys() {
		return new Object[] { "Dagannoth Rex" };
	}

	public int attack(NPC npc, Entity target) {
		NPCCombatDefinitions defs = npc.getCombatDefinitions();
		int damage = 280 - Misc.random(100);
		npc.setNextAnimation(new Animation((Misc.random(2) == 1 ? 2853 : 2853)));
		delayHit(npc, 0, target, new Hit[] { getMeleeHit(npc, damage) });
		return defs.getAttackDelay();
	}
}
